package vip.xiaozhao.paotui.intf.service;

import vip.xiaozhao.paotui.intf.dto.PaoTuiDetailDO;
import vip.xiaozhao.paotui.intf.dto.PaoTuiSelectionDO;
import vip.xiaozhao.paotui.intf.entity.PaotuiDetail;
import vip.xiaozhao.paotui.intf.enums.*;

import java.util.List;

public interface PaotuiDetailService {

    int insert(PaotuiDetail detail);

    PaotuiDetail loadById(int id);

    PaotuiDetail loadVersionLockById(int id);

    //乐观锁，如果没成功 就返回0，成功就返回修改行数 也就是1
    int updateByVersionLock(PaotuiDetail paotuiDetail);


    int update(PaotuiDetail paotuiDetail);

    PaoTuiDetailDO getList(PaoTuiSelectionDO paoTuiSelectionDO, int pageId , int size);

    PaoTuiDetailDO getNextList(PaoTuiSelectionDO paoTuiSelectionDO, int lastId , int size);
}
